package com.weixinli.biz.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.weixinli.beans.Smile;
import com.weixinli.biz.ISmileBiz;
import com.weixinli.dao.ISmileDao;

@Scope("prototype")
@Service("iSmileBiz")
public class SmileBizImpl implements ISmileBiz {
	@Resource(name="iSmileDao")
	private ISmileDao smileDao;
	
	public void setSmileDao(ISmileDao smileDao) {
		this.smileDao = smileDao;
	}

	public int addSmile(Smile sm) {
		return smileDao.addSmile(sm);
	}

	public int delSmile(Integer sid) {
		return 0;
	}

	public int modSmile(Smile sm) {
		return 0;
	}

	public List<Smile> getPageSmile(Integer pageNo, Integer pageSize) {
		return smileDao.getPageSmile(pageNo, pageSize);
	}

	public int getTotalSmile() {
		return smileDao.getTotalSmile();
	}

	public int getTotalMySmile(int w_uid) {
		return smileDao.getTotalMySmile(w_uid);
	}

	public List<Map<String, Object>> getOneSmile(String sid) {
		return smileDao.getOneSmile(sid);
	}

	public List<Smile> getMySmile(Integer pageNo, Integer pageSize, Integer w_uid) {
		return smileDao.getMySmile(pageNo, pageSize, w_uid);
	}

}
